package com.yjy.state_machine.v1;

public class MainTest {
    public static void main(String[] args) {
        OrderContext context = new OrderContext();

        // 创建订单
        context.setHandleState("create");
        new CreateStateHandler().handle(context);

        // 付款
        context.setHandleState("paying");
        new PayingStateHandler().handle(context);

        // 支付完成后，进入【待发货】
        context.setHandleState("payFinish");
        new PayFinishStateHandler().handle(context);
    }
}
